/*
 * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef __DRM_LOG_H__
#define __DRM_LOG_H__

#include <stdint.h>
#include "ulog.h"
#include "bsp_rtc.h"

#define DRM_LOG(...) ulog_message(__VA_ARGS__)
#define DRM_LOGT(...) ulog_message(ULOG_TRACE_LEVEL, __VA_ARGS__)
#define DRM_LOGD(...) ulog_message(ULOG_DEBUG_LEVEL, __VA_ARGS__)
#define DRM_LOGI(...) ulog_message(ULOG_INFO_LEVEL, __VA_ARGS__)
#define DRM_LOGW(...) ulog_message(ULOG_WARNING_LEVEL, __VA_ARGS__)
#define DRM_LOGE(...) ulog_message(ULOG_ERROR_LEVEL, __VA_ARGS__)
#define DRM_LOGC(...) ulog_message(ULOG_CRITICAL_LEVEL, __VA_ARGS__)
#define DRM_LOGA(...) ulog_message(ULOG_ALWAYS_LEVEL, __VA_ARGS__)

extern void drm_log_init(void); /* 初始化log相关 */
extern int16_t drm_log_get_queue_length(void); /* 获取缓存长度 */
extern int16_t drm_log_queue_puts_data(uint8_t *buff, uint16_t len); /* 获取缓存数据 */
extern int8_t drm_log_handle(uint8_t* index, rtc_driver_t *rtc_time);

#endif /* __DRM_LOG_H__ */
